package com.net.oil.car.presenter;

import com.net.oil.base.BasePresenter;
import com.net.oil.car.bean.CarBean;
import com.net.oil.car.contract.MyCarContract;
import com.net.oil.car.model.MyCarModel;

import java.util.List;

/**
 * 作者：lch
 * 时间：2018/4/30 0030:下午 21:32
 * 邮箱：245850413@qq.com
 * 说明：
 */

public class MyCarPresenter extends BasePresenter<MyCarContract.View> implements MyCarContract.Presenter {

    private MyCarContract.View view;
    private MyCarContract.Model model;

    public MyCarPresenter(MyCarContract.View view) {
        this.view = view;
        model = new MyCarModel(this);
    }

    @Override
    protected void unSubscribe() {
        model.unSubscribe();
    }

    @Override
    public void getMyCarList() {
        model.getMyCarList();
    }

    @Override
    public void getMyCarListSuccess(List<CarBean> carBeans) {
        view.getMyCarListSuccess(carBeans);
    }

    @Override
    public void getMyCarListFailed() {
        view.getMyCarListFailed();
    }
}
